SCRIPT
ABORT OFF

;  Test to see which File Area Level bits are turned on.
DEFINE Loop
DEFINE Count
DEFINE Valid_sig
DEFINE Split

SET Valid_sig = 0
SET Count     = 0

FOR Loop = 1 to 32 DO
   IF FILE_LEVEL (Loop) THEN
      INCREASE Count (1)
   ENDIF
ENDFOR

IF Count > 16 THEN              ;3jan93r.s.
   SET Split = Count / 2
ENDIF                           ;3jan93r.s.

IF Count = 0 THEN
   PRINTE 'Sorry, you do not have access to any file areas...'
   PRINT  'Press your RETURN or ENTER key to exit...
   GOTO Zero_sigs_
ELSEIF Count = 1 THEN
   PRINTE '&01, you have access to only one File Area,'
   PRINT  'File SIG number '
ELSE
   PRINTE '&01, you have access to [Count] of our File areas,'
   PRINTE 'here is a list of those File SIG numbers:'
   PRINTE
ENDIF

DEFINE Temp_1

SET Count = 1
Print_sig_numbers_:
   IF FILE_LEVEL (Count) THEN
;      EXPAND (Count, 2) ; 3jan93r.s. pads the right, not left
      Temp_1 = count
      set temp_1 = ' [count]'
;      PRINT '[Count], '
      PRINT '[temp_1], '
      INCREASE Valid_sig (1)
   ENDIF

   IF Valid_sig = Split THEN
      PRINTE
   ENDIF

   INCREASE Count (1)

   IF Count > 32 THEN
      GOTO End_of_sig_count_
   ELSE
      GOTO Print_sig_numbers_:
   ENDIF


End_of_sig_count_:
   BACKSPACE (2)
   PRINTE '.'

Zero_sigs_:

PRINT 'Enter The File SIG Number, L for "L"ist, or RETURN KEY to abort'
DEFAULT_PATH
EXIT
